<?php
namespace app\index\validate;

use think\Validate;

class Save extends Validate
{
    protected $rule = [
        'username'=>'require|regex:[a-z]\w{6,8}|unique:user',
        'phone'=>'require|regex:1\d{10}|unique:user',
        'email'=>'require|email|unique:user'
    ];

    protected $message = [
        'username.unique'=>'昵称已昵称',
        'phone.unique'=>'手机已经被使用',
        'email.unique'=>'邮箱已经被使用'
    ];

}